#include "hellodialog.h"
#include "ui_hellodialog.h"

#include<QMessageBox>

HelloDialog::HelloDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::HelloDialog)
{//主界面构造函数
    ui->setupUi(this);
    //this->setWindowTitle("默认窗口名");
    ui->lineEdit->setText("默认字符串");
    ui->lineEdit->setText(QString::number(123));

    QObject::connect(ui->pushButton_ok, SIGNAL(clicked()), this , SLOT(ButtonSlot()) );
    //QObject::connect(ui->pushButton_quit, SIGNAL(clicked()), ui->pushButton_ok , SLOT(click()) );

    // QObject::connect(ui->horizontalScrollBar, SIGNAL(clicked()), this , SLOT(ButtonSlot()) );
}

HelloDialog::~HelloDialog()
{
    delete ui;
}

void HelloDialog::ButtonSlot()
{
    QMessageBox::information(this, "message", ui->lineEdit->text());
}
void HelloDialog::scrollChanged()
{
    ui->lineEdit->text()="123";
}
